Categorical semantics and composition of tree transducers
نویسنده
چکیده
ion from Y yields T∆+AI(QX) (r̂)X ←−−−− AI ( Q(ΣX)). Now we need the coproduct of monads: With T∆ = |∆ | and Lemma 6.2.4.1 we can write the rule as |∆ + ( AI(QX) )? | (r̂)X ←−−−− AI ( Q(ΣX)). Abstracting from X gives using from X gives us | | · (∆ + ) · ( ) · AI · Q r̂ ←−− AI · Q · Σ. We have the adjunctions Q a U and AI a ΛI as in Subsection 6.4.3 and ( ) ? a | | from Corollary 4.4.4.6. Now we use ( ) w.r.t. ( ) · AI · Q a U · ΛI · | |, Definition and Lemma 6.2.4.2 (i), and Definition 6.2.3.4 to write the rule as ( )? · AI · Q (∆ ) r̂ ←−− Σ. The latter is the rule of a monadic transducer with pattern ( )? · AI · Q · ( ) +. The observation function is defined just as in Subsection 6.4.3. Altogether we have: 6.4.5.1 Proposition. The macro tree transducers are equivalent7 to the monadic transducers M = ( ( )? · AI · Q · ( ) , %, ω ) : ∆← Σ on Setא0 where I is a finite set, Q is a cocartesian and Σ and ∆ are bicartesian. 6.4.5.2 Example. Let us now illustrate the monadic operations of the monad AI(( )?(∆ ?)+). It is helpful to have a look at Example 4.4.1.4 and Example 6.4.2.3 before. For every context variable y and terms t1, . . . tk we draw t1 . . . tk y for the applicative term ’y t1 · · · tk. The unit is simple: X ΛIT∆+AIX x λ 1 · · · k. 1 · · · k x ηX
منابع مشابه
Syntactic composition of top-down tree transducers is short cut fusion
We compare two deforestation techniques: short cut fusion formalized in category theory and the syntactic composition of tree transducers. The former strongly depends on types and uses the parametricity property or free theorem whereas the latter makes no use of types at all and allows more general compositions. We introduce the notion of a categorical transducer which is a generalization of a ...
متن کاملMulti-Return Macro Tree Transducers
An extension of macro tree transducers is introduced with the capability of states to return multiple trees at the same time. Under call-by-value semantics, the new model is strictly more expressive than call-by-value macro tree transducers, and moreover, it has better closure properties under composition.
متن کاملBottom-Up and Top-Down Tree Series Transformations
We generalize bottom-up tree transducers and top-down tree transducers to the concept of bottom-up tree series transducer and top-down tree series transducer, respectively, by allowing formal tree series as output rather than trees, where a formal tree series is a mapping from output trees to some semiring. We associate two semantics with a tree series transducer: a mapping which transforms tre...
متن کاملCategorical Views on Computations on Trees
Computations on trees form a classical topic in computing. These computations can be described in terms of machines (typically called tree transducers), or in terms of functions. This paper focuses on three flavors of bottom-up computations, of increasing generality. It brings categorical clarity by identifying a category of tree transducers together with two different behavior functors. The fi...
متن کاملMacro Tree Transducers
Macro tree transducers are a combination of top-down tree transducers and macro grammars. They serve as a model for syntax-directed semantics in which context information can be handled. In this paper the formal model of macro tree transducers is studied by investigating typical automata theoretical topics like composition, decomposition, domains, and ranges of the induced translation classes. ...
متن کامل